﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<title>角色编辑</title>
</head>
<#include "../common/common.html">
<body>
	<article class="page-container aform">
	    <form class="form form-horizontal" id="form" method="post" enctype="multipart/form-data"  >
	  		<h4> &nbsp;1. 商品详细信息</h4>
		    <table class="table table-border " style="margin-top: 1%;">
				<tr>
					<td>
						<div class="row cl">
							<label class="form-label col-xs-8 col-sm-2"><span class="c-red">*</span>商品名称：</label>
							<div class="formControls col-xs-4 col-sm-3">
								<input style="width: 100%;" type="text" class="input-text" value="${commodity.commodity_name!}" placeholder="" id="commodity_name" name="commodity_name">
							</div>
			
							<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>商品规格：</label>
							<div class="formControls col-xs-4 col-sm-3">
								<input style="width: 100%;" type="text" class="input-text" value="${commodity.specification!}" placeholder="" id="specification" name="specification">
							</div>
						</div>
<!-- 					</td> -->
<!-- 				</tr> -->
				
<!-- 				<tr> -->
<!-- 					<td> -->
						<div class="row cl">
							<label class="form-label col-xs-8 col-sm-2"><span class="c-red">*</span>款式：</label>
							<div class="formControls col-xs-4 col-sm-3">
								<select class="input-text radius" value="${commodity.style!} " id="style" name="style">
									<#list styleList as s>
										<option value="${s.dic_value!}" <#if (s.dic_value! == commodity.style!)>  selected="selected" </#if> >${s.dic_name!} </option>
									</#list>
								</select>
							</div>
							
			
							<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>图案：</label>
							<div class="formControls col-xs-4 col-sm-3">
								<select class="input-text radius" value="${commodity.patten!} " id="patten" name="patten">
									<#list pattenList as p>
										<option value="${p.dic_value!}" <#if (p.dic_value! == commodity.patten!)> selected="selected" </#if>>${p.dic_name!} </option>
									</#list>
								</select>
							</div>
						</div>
<!-- 					</td> -->
<!-- 				</tr> -->
				
<!-- 				<tr> -->
<!-- 					<td> -->
						<div class="row cl">
							<label class="form-label col-xs-8 col-sm-2"><span class="c-red">*</span>产地：</label>
							<div class="formControls col-xs-4 col-sm-3">
								<input style="width: 100%;" type="text" class="input-text" value="${commodity.origin!}" placeholder="" id="origin" name="origin">
							</div>
	
							<label class="form-label col-xs-8 col-sm-2"><span class="c-red">*</span>排序：</label>
							<div class="formControls col-xs-4 col-sm-3">
								<input style="width: 100%;" type="text" class="input-text" value="${commodity.sort!}" placeholder="" id="sort" name="sort">
							</div>
						</div>
<!-- 					</td> -->
<!-- 				</tr> -->
				
<!-- 				<tr> -->
<!-- 					<td> -->
						<div class="row cl">
							<label class="form-label col-xs-8 col-sm-2"><span class="c-red">*</span>起拍时间：</label>
							<div class="formControls col-xs-4 col-sm-3">
								<input style="width: 100%;"  onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'end_date_time\')||\'%y-%M-%d \'}',dateFmt: 'yyyy-MM-dd HH:mm:ss'})" class="input-text Wdate" value="${commodity.start_date_time!}" placeholder="" id="start_date_time" name="start_date_time">
							</div>
	
							<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>结束时间：</label>
							<div class="formControls col-xs-4 col-sm-3">
								<input style="width: 100%;" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'start_date_time\')}',dateFmt: 'yyyy-MM-dd HH:mm:ss'})" class="input-text Wdate" value="${commodity.end_date_time!}" placeholder="" id="end_date_time" name="end_date_time">
							</div>
						</div>
<!-- 					</td> -->
<!-- 				</tr> -->
				
<!-- 				<tr> -->
<!-- 					<td> -->
						<div class="row cl">
							<label class="form-label col-xs-8 col-sm-2"><span class="c-red">*</span>起拍价：</label>
							<div class="formControls col-xs-4 col-sm-3">
								<input style="width: 100%;" type="text" class="input-text" value="${commodity.start_price!}" placeholder="" id="start_price" name="start_price">
							</div>
			
							<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>竞拍加价：</label>
							<div class="formControls col-xs-4 col-sm-3">
								<input style="width: 100%;" type="text" class="input-text" value="${commodity.add_price!}" placeholder="" id="add_price" name="add_price">
							</div>
						</div>
<!-- 					</td> -->
<!-- 				</tr> -->
				
<!-- 				<tr> -->
<!-- 					<td> -->
						<div class="row cl">
							<label class="form-label col-xs-8 col-sm-2"><span class="c-red">*</span>成交价：</label>
							<div class="formControls col-xs-4 col-sm-3">
								<input style="width: 100%;" type="text" class="input-text" value="${commodity.deal_price!}" placeholder="" id="deal_price" name="deal_price">
							</div>
			
							<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>回收比例：</label>
							<div class="formControls col-xs-4 col-sm-3">
								<input style="width: 100%;" type="text" class="input-text" value="${commodity.add_price!}" placeholder="" id="add_price" name="add_price">
							</div>
						</div>
<!-- 					</td> -->
<!-- 				</tr> -->
				
<!-- 				<tr> -->
<!-- 					<td> -->
						<div class="row cl">
							<label class="form-label col-xs-8 col-sm-2"><span class="c-red">*</span>收藏数：</label>
							<div class="formControls col-xs-4 col-sm-3">
								<input style="width: 100%;" type="text" class="input-text" value="${commodity.collection_num!}" placeholder="" id="collection_num" name="collection_num">
							</div>
			
							<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>浏览数：</label>
							<div class="formControls col-xs-4 col-sm-3">
								<input style="width: 100%;" type="text" class="input-text" value="${commodity.browse_num!}" placeholder="" id="browse_num" name="browse_num">
							</div>
						</div>
<!-- 					</td> -->
<!-- 				</tr> -->
				
<!-- 				<tr> -->
<!-- 					<td> -->
						<div class="row cl">
							<label class="form-label col-xs-8 col-sm-2">  <span class="c-red">*</span>封面：</label>
							<div class="formControls col-xs-4 col-sm-3">
								<div class="fileupload fileupload-new" data-provides="fileupload">
									<div class="fileupload-new thumbnail" style="width: 200px; height: 150px;"></div>
									<div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; ">
										<img id="picture" style="max-width: 200px; max-height: 150px; " src="${ctx}/${commodity.picture}"/>
									</div>
									<div>
										<span class="btn btn-file"><span class="fileupload-new">选择图片</span>
											<span class="fileupload-exists">修改</span> <input type="file" class="default" name="picture" id="picture" /></span> <a
											href="javascript:void();" id="removePic"
											class="btn fileupload-exists" data-dismiss="fileupload">移除</a> <input
											id="picture" type="hidden" name="" value="">
									</div>
									<span class="label label-important">提示!</span>
									<span>仅支持png,jpg格式的图片</span>
								</div>
							</div>
							
							<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>描述：</label> 
							<div class="formControls col-xs-4 col-sm-3">
								<textarea name="describes" id="describes" value="${commodity.describes!}" class="textarea valid" placeholder="说点什么...100个字符以内" dragonfly="true" ">${commodity.describes!}</textarea>
								</p>
							</div>
						</div>
					</td>
				</tr>
			</table>	
			<h4> &nbsp;2. 商品图片：</h4>
			<div class="row cl">
				<!-- 1. -->
				<label class="form-label col-xs-8 col-sm-2">  <span class="c-red"></span></label>
				<div class="formControls col-xs-4 col-sm-2">
					<div class="fileupload fileupload-new" data-provides="fileupload">
						<div class="fileupload-new thumbnail" style="width: 200px; height: 150px;"></div>
						<div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; ">
							<img id="first_picture" src="${ctx}/${commodity.first_picture}" alt="" style="max-width: 200px; max-height: 150px; " />
						</div>
						<div>
							<span class="btn btn-file"><span class="fileupload-new">选择图片</span>
								<span class="fileupload-exists">修改</span> <input type="file" class="default" name="first_picture" id="first_picture" /></span> <a
								href="javascript:void();" id="removePic"
								class="btn fileupload-exists" data-dismiss="fileupload">移除</a> <input
								id="first_picture" type="hidden" name="picaddress" value="">
						</div>
					</div>
				</div>
				<!-- 1. -->

				<!-- 2. -->
				<label class="form-label col-xs-8 col-sm-1"></label>
				<div class="formControls col-xs-4 col-sm-2">
					<div class="fileupload fileupload-new" data-provides="fileupload">
						<div class="fileupload-new thumbnail" style="width: 200px; height: 150px;"></div>
						<div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; ">
							<img id="second_picture" src="${ctx}/${commodity.second_picture}" alt="" style="max-width: 200px; max-height: 150px; " />
						</div>
						<div>
							<span class="btn btn-file"><span class="fileupload-new">选择图片</span>
								<span class="fileupload-exists">修改</span> <input type="file" class="default" name="second_picture" id="second_picture" /></span> <a
								href="javascript:void();" id="removePic"
								class="btn fileupload-exists" data-dismiss="fileupload">移除</a> <input
								id="second_picture" type="hidden" name="picaddress" value="">
						</div>
					</div>
				</div>
				<!-- 2. -->
				
				<!-- 3. -->
				<label class="form-label col-xs-8 col-sm-1"></label>
				<div class="formControls col-xs-4 col-sm-2">
					<div class="fileupload fileupload-new" data-provides="fileupload">
						<div class="fileupload-new thumbnail" style="width: 200px; height: 150px;"></div>
						<div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; ">
							<img id="thrid_picture" src="${ctx}/${commodity.thrid_picture}" alt="" style="max-width: 200px; max-height: 150px; " />
						</div>
						<div>
							<span class="btn btn-file"><span class="fileupload-new">选择图片</span>
								<span class="fileupload-exists">修改</span> <input type="file" class="default" name="thrid_picture" id="thrid_picture" /></span> <a
								href="javascript:void();" id="removePic"
								class="btn fileupload-exists" data-dismiss="fileupload">移除</a> <input
								id="thrid_picture" type="hidden" name="picaddress" value="">
						</div>
					</div>
				</div>
				<!-- 3. -->
			</div>
			
			<div class="row cl">
				<!-- 4. -->
				<label class="form-label col-xs-8 col-sm-2"></label>
				<div class="formControls col-xs-4 col-sm-2">
					<div class="fileupload fileupload-new" data-provides="fileupload">
						<div class="fileupload-new thumbnail" style="width: 200px; height: 150px;"></div>
						<div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; ">
							<img id="fourth_picture" src="${ctx}/${commodity.fourth_picture}"  alt=""style="max-width: 200px; max-height: 150px; " />
						</div>
						<div>
							<span class="btn btn-file"><span class="fileupload-new">选择图片</span>
								<span class="fileupload-exists">修改</span> <input type="file" class="default" name="fourth_picture" id="fourth_picture" /></span> <a
								href="javascript:void();" id="removePic"
								class="btn fileupload-exists" data-dismiss="fileupload">移除</a> <input
								id="fourth_picture" type="hidden" name="picaddress" value="">
						</div>
					</div>
					<span class="label label-important">提示!</span>
					<span>仅支持png,jpg格式的图片</span>
				</div>
				<!-- 4. -->

				<!-- 5. -->
				<label class="form-label col-xs-8 col-sm-1"></label>
				<div class="formControls col-xs-4 col-sm-2">
					<div class="fileupload fileupload-new" data-provides="fileupload">
						<div class="fileupload-new thumbnail" style="width: 200px; height: 150px;"></div>
						<div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; ">
							<img id="fifth_picture" src="${ctx}/${commodity.fifth_picture}"  alt="" style="max-width: 200px; max-height: 150px; " />
						</div>
						<div>
							<span class="btn btn-file"><span class="fileupload-new">选择图片</span>
								<span class="fileupload-exists">修改</span> <input type="file" class="default" name="fifth_picture" id="fifth_picture" /></span> <a
								href="javascript:void();" id="removePic"
								class="btn fileupload-exists" data-dismiss="fileupload">移除</a> <input
								id="fifth_picture" type="hidden" name="picaddress" value="">
						</div>
					</div>
				</div>
				<!-- 5. -->
				
				<!-- 6. -->
				<label class="form-label col-xs-8 col-sm-1"></label>
				<div class="formControls col-xs-4 col-sm-2">
					<div class="fileupload fileupload-new" data-provides="fileupload">
						<div class="fileupload-new thumbnail" style="width: 200px; height: 150px;"></div>
						<div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; ">
							<img id="sixth_picture" src="${ctx}/${commodity.sixth_picture}"  alt="" style="max-width: 200px; max-height: 150px; " />
						</div>
						<div>
							<span class="btn btn-file"><span class="fileupload-new">选择图片</span>
								<span class="fileupload-exists">修改</span> <input type="file" class="default" name="sixth_picture" id="sixth_picture" /></span> <a
								href="javascript:void();" id="removePic"
								class="btn fileupload-exists" data-dismiss="fileupload">移除</a> <input
								id="sixth_picture" type="hidden" name="picaddress" value="">
						</div>
					</div>
				</div>
				<!-- 6. -->
			</div>
				<input type="hidden" id="id" value="${commodity.id!}" name="id">
						<div class="row cl">
							<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
								<input class="btn btn-primary radius" type="submit" id="submitBtn" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
								<button onClick="removeWindow();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
							</div>
						</div>
		</form>
	</article>
</body>
<#include "../common/edit.html">
<link rel="stylesheet" type="text/css" href="${ctx}/static/lib/fileupload/bootstrap-fileupload.css" />
<script type="text/javascript" src="${ctx}/static/lib/fileupload/bootstrap-fileupload.js"></script>
 <script type="text/javascript" src="${ctx}/static/js/commodity/commodity-edit.js"></script>
</html>